<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1 {
	width: 195px;
}

.select_width {
	width: 130px;
}
</style>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code" scope="page"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>

<table class="t_css" width="100%" border="0" cellpadding="0"
	id="basicInfo" cellspacing="1">
	<tr>
		<td colspan="6" class="t_bar2">基本信息</td>

	</tr>
	<tr>
		<td align="right" width="135"><span class="color_red">*</span>项目名称：</td>
		<td colspan="5"><input id="zh_title" name="proposal/zh_title"
			label="项目名称" type="text" required
			class="input_css required maxlength:100" style="width: 725px;"
			maxlength="100"
			value="<x:out select="$xmlData/data/proposal/zh_title" />" /></td>
	</tr>
	
	<tr>
		<td align="right">企业类型：</td>
		<td colspan="5">
		<c:choose>
		<c:when test="${grant_code eq '95' }"><span name="proposal/nature_type_name">市重点小微企业</span></c:when>
		<c:when test="${grant_code eq '96' }"><span name="proposal/nature_type_name">市重点龙头型企业</span></c:when>
		<c:otherwise></c:otherwise>
		</c:choose>
		</td>
	</tr>

	<tr>
		
		<td align="right" nowrap><span class="color_red">*</span>批准文件（文号）：</td>
		<td colspan="3"><input name="proposal/file_no" label="批准文件（文号）" type="text"
			required class="input_css required maxlength:100" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/file_no" />" /></td>
		<td align="right" nowrap><span class="color_red">*</span>认定时间：</td>
		<td><c:set var="hold_date">
				<x:out select="$xmlData/data/proposal/hold_date" />
			</c:set> <cpt:date id="hold_date" name="proposal/hold_date"
				value="${hold_date}" className=" required date" label="认定时间"></cpt:date>
		</td>
	</tr>

	
	<tr>
		<td align="right" nowrap><span class="color_red">*</span>申报日期：</td>
		<td colspan="5"><c:set var="submit_date">
				<x:out select="$xmlData/data/proposal/submit_date" />
			</c:set> <cpt:date id="submit_date" name="proposal/submit_date"
				value="${submit_date}" className=" required date" label="申报日期"></cpt:date>
		</td>

	</tr>

	<tr>
		<td colspan="6" class="t_bar2">上年度主要经营状况（单位：万元）</td>

	</tr>
    <tr align="center">
    <td  width="135" align="right">销售收入：</td>
    <td>
    <input type="hidden" name="proposal/finance_income1" id="finance_income1" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no='3']/income" />"/>
    <input type="hidden" name="proposal/finance_income2" id="finance_income2" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no='5']/income" />"/>
    <input type="hidden" name="proposal/proft_total1" id="proft_total1" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no='3']/proft_total" />"/>
    <input type="hidden" name="proposal/proft_total2" id="proft_total2" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no='5']/proft_total" />"/>
    <input type="hidden" name="proposal/fax1" id="fax1" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no='3']/fax" />"/>
    <input type="hidden" name="proposal/fax2" id="fax2" value="<x:out select="$xmlData/data/organization/finances/finance[@sequence_no='5']/fax" />"/>
    <span name="proposal/finance_income" id="finance_income"></span></td>
    <td align="right">同比增加：</td>
    <td><span name="proposal/finance_income_pre" id="finance_income_pre"></span></td>
    <td align="right">增幅（%）：</td>
   <td > <span name="proposal/finance_income_growth" id="finance_income_growth"></span></td>
    </tr>
  <tr align="center">
    <td align="right">利润总额：</td>
    <td><span name="proposal/finance_proft_total"  id="finance_proft_total"></span></td>
    <td align="right">同比增加：</td>
    <td><span name="proposal/finance_proft_total_pre"  id="finance_proft_total_pre"></span></td>
    <td align="right">增幅（%）：</td>
  <td> <span name="proposal/finance_proft_total_growth" id="finance_proft_total_growth""></span></td>
    </tr>
    <tr align="center">
   
    <td align="right">税收总额：</td>
    <td><span name="proposal/finance_fax" id="finance_fax"></span></td>
    <td align="right">同比增加：</td>
    <td><span name="proposal/finance_fax_pre" id="finance_fax_pre"></span></td>
    <td align="right">增幅（%）：</td>
   <td> <span name="proposal/finance_fax_growth" id="finance_fax_growth"></span></td>
    </tr>
	<tr>
		<td colspan="6" class="t_bar2">税收贡献情况</td>

	</tr>
	<tr align="center">
	<td rowspan="4">${year-2 }年度</td>
	<td align="right">增值税（万元）：</td>
	<td><span id="total_add" name="proposal/total_add"></span></td>
	
	<td rowspan="4">${year-1 }年度</td>
	<td align="right">增值税（万元）：</td>
	<%-- <td><input name="proposal/sale_add"   label="本年度税收贡献情况-->增值税"  class="required" onchange="countFundAuto('sale_','business,add,organization','totoal');"  id="sale_add" onfocus="InitInput.setNumber(this,7,4,2)"  value="<x:out select="$xmlData/data/proposal/sale_add"/>" style="text-align:right"/></td> --%>
	<td><span id="sale_add" name="proposal/sale_add"></span></td>
	 </tr>
	<tr align="center">
	<td align="right">营业税（万元）：</td>
	<td><span id="total_business" name="proposal/total_business"></span></td>
	
	<td align="right">营业税（万元）：</td>
	<%-- <td><input name="proposal/sale_business"   label="本年度税收贡献情况-->营业税"  class="required" onchange="countFundAuto('sale_','business,add,organization','totoal');" id="sale_business" onfocus="InitInput.setNumber(this,7,4,2)"  value="<x:out select="$xmlData/data/proposal/sale_business"/>" style="text-align:right"/></td> --%>
	<td><span id="sale_business" name="proposal/sale_business"></span></td>
	</tr>
	<tr align="center">
	<td align="right">企业所得税（万元）：</td>
		<td><span id="total_organization" name="proposal/total_organization"></span></td>
	
	<td align="right">企业所得税（万元）：</td>
	<%-- <td><input name="proposal/sale_organization"  label="本年度税收贡献情况-->企业所得税" class="required"  onchange="countFundAuto('sale_','business,add,organization','totoal');"  id="sale_organization" onfocus="InitInput.setNumber(this,7,4,2)"  value="<x:out select="$xmlData/data/proposal/sale_organization"/>" style="text-align:right"/></td> --%>
	<td><span id="sale_organization" name="proposal/sale_organization"></span></td>
	</tr>
	<tr align="center">
	<td align="right">合计：</td>
	<td><span id="total_total" name="proposal/total_total"></span></td>
	<td align="right">合计：</td>
	<%-- <td><input name="proposal/sale_totoal" label="本年度税收贡献情况-->合计" class="gray" disabled id="sale_totoal" onfocus="InitInput.setNumber(this,7,4,2)"  value="<x:out select="$xmlData/data/proposal/sale_totoal"/>" style="text-align:right"/></td> --%>
	<td><span id="sale_total" name="proposal/sale_totoal"></span></td>
	</tr>
	

	
	
	


	<tr>
		<td colspan="6" class="t_bar2">申请项目资金情况</td>

	</tr>
	<tr>
		<td align="right"  width="135">项目类别：</td>
		<td colspan="3"><x:out select="$xmlData/data/proposal/grant_name" /></td>
		<td align="right">支持方式：</td>
		<td ><span name="proposal/sponsor_category"><x:out
					select="$xmlData/data/proposal/sponsor_category" /></span></td>

	</tr>
	<tr>
	
		
		<td align="right"><span class="color_red">*</span>申请金额(万元 )：</td>
		<td  colspan="3">
			<input id="source_apply" name="proposal/total_funds" style="text-align:right;" onfocus="InitInput.setNumber(this,7,4,2)" label="申请金额" type="text" required class="input_css required"   maxlength="20" value="<x:out select="$xmlData/data/proposal/total_funds" />"/>
		</td>
		<td  align="right">资金级次：</td>
		<td >
		<span  name="proposal/fund_level">市级</span>
		</td>
	</tr>

	<tr>
		<td align="right" nowrap>归口管理部门：</td>
		<td colspan="3"><span name="proposal/org_name">无锡市经济和信息化委员会</span></td>
		<td align="right">管理类别：</td>
		<td ><span name="proposal/manage_category"><x:out
					select="$xmlData/data/proposal/manage_category" /></span></td>

	</tr>
	
	<tr style="display: none">
		<td></td>
	</tr>
	<tr>
		<td align="right" nowrap><span class="color_red">*</span>项目所属产业：</td>
		<td nowrap colspan="5"><c:set var="industry">
				<x:out select="$xmlData/data/proposal/industry_value" />
			</c:set> <cpt:checkbox key="industry" name="industry" repeatColumn="7"
				style="border: 0px; padding: 0px; margin: 0px;float:left;"></cpt:checkbox>
			<input type="hidden" id="industry_value"
			name="proposal/industry_value" class="required" value="${industry}"
			label="项目所属产业"> <input type="hidden"
			name="proposal/industry_name"
			value="<x:out select="$xmlData/data/proposal/industry_name" />">
		</td>
	</tr>
	<tr>
		<td align="right">功能分类：</td>
		<td colspan="5"><span name="proposal/grant_function"><x:out
					select="$xmlData/data/proposal/grant_function" /></span></td>

	</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="1">
	<tr>
		<td class="t_bar2">申请资助依据条款</td>

	</tr>
	<tr>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span
			name="proposal/policy_foundation"><x:out
					select="$xmlData/data/proposal/policy_foundation" /></span>
		</td>
	</tr>
</table>
<br />





<table class="t_css" width="100%" border="0" cellpadding="0"
	cellspacing="1" id="basicInfo5">
	<tr>
		<td class="t_bar2" colspan="8">人员信息</td>

	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>项目联系人：</td>
		<td><input name="proposal/contact_psn_cname" label="项目联系人"
			type="text" required class="input_css required" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />" />
		</td>
		<td align="right"><span class="color_red">*</span>联系电话：</td>
		<td><input name="proposal/contact_psn_tel" label="联系电话"
			type="text" required class="input_css required" maxlength="50"
			value="<x:out select="$xmlData/data/proposal/contact_psn_tel" />" />
		</td>
		<td align="right"><span class="color_red">*</span>联系手机：</td>
		<td><input name="proposal/contact_psn_mobile" label="联系手机"
			type="text" required maxlength="11" required
			class="input_css required mobile" maxlength="20"
			value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />" />
		</td>
		<td align="right"><span class="color_red">*</span>电子邮箱：</td>
		<td><input name="proposal/contact_psn_email" label="电子邮箱"
			type="text" required class="input_css required email" maxlength="100"
			value="<x:out select="$xmlData/data/proposal/contact_psn_email" />" />
		</td>
	</tr>
	<tr>
		<td  align="right">项目负责人：</td>
		<td>
			<input  name="proposal/fzr_psncode" type="hidden" required class="input_css "   maxlength="20" value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/psn_code" />"/> 
		    
		    <span name="proposal/fzr_psnname" ><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		    <c:set var="psnCode"><x:out select="$xmlData/data/proposal/psn_code" /></c:set>
		    <security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
				<span id="personSelect">
				<input type="button" class="button_02" style="height: 25px; padding: 1px;" id="selectPsn" value="设置">
				<cpt:personSelect key="personSelect"  addRole="3"  psnCode="${psnCode}" callback="selectPsnCall" bindEvent="click" bindObject="selectPsn" title="设置项目负责人" fltFile="personSelector.ftl"></cpt:personSelect>
				</span>
			</security:authorize>
		
		</td>
		<security:authorize ifNotGranted="A_DAILU_PROPOSAL"> 
		<td  align="right">联系电话：</td>
		<td  >
		<span name="proposal/fzr_tel"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span>
		</td>
		<td  align="right">联系手机：</td>
		<td  >
		<span name="proposal/fzr_mobile"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		</security:authorize>
		<security:authorize ifAnyGranted="A_DAILU_PROPOSAL">
		<td  align="right"><span class="color_red">*</span>联系电话：</td>
		<td  >
		<input name="proposal/fzr_tel" label="项目负责人联系电话" type="text" required  class="input_css required"  onchange="synFzrMsg(1)"  maxlength="50"  value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" />"/>
		</td>
		<td  align="right"><span class="color_red">*</span>联系手机：</td>
		<td  >
		<input name="proposal/fzr_mobile" label="项目负责人联系手机" type="text" onchange="synFzrMsg(1)" onfocus="InitInput.setNumber(this,11,0,0)"  maxlength="11"  class="input_css required mobile"   value="<x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" />"/>
		</td>
		</security:authorize>
		<td  align="right">电子邮箱：</td>
		<td  >
		<span name="proposal/fzr_mail"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
		
		</tr>


</table>

<script type="text/javascript">


$(function(){
	
	
	$("#total_assets").text(formatVal2($("#finance_930_4").text()));
	$("#net_asset").text(formatVal2($("#finance_931_4").text() ));
	$("#business_sale").text(formatVal2($("#finance_91_4").text()));
	
	$("#sale_add").text($("#finance_920_4").text().replace(new RegExp("\,","g"), ""));
	$("#sale_business").text($("#finance_921_4").text().replace(new RegExp("\,","g"), ""));
	$("#sale_organization").text($("#finance_922_4").text().replace(new RegExp("\,","g"), ""));
	countFundSpanAuto("sale_","add,business,organization","total");
	$("#total_add").text($("#finance_920_2").text().replace(new RegExp("\,","g"), ""));
	$("#total_business").text($("#finance_921_2").text().replace(new RegExp("\,","g"), ""));
	$("#total_organization").text($("#finance_922_2").text().replace(new RegExp("\,","g"), ""));
	countFundSpanAuto("total_","add,business,organization","total");
	
	var finance_income1= $("#finance_income1").val().replace(new RegExp("\,","g"), "");
	var finance_income2= $("#finance_income2").val().replace(new RegExp("\,","g"), "");
	
	var finance_proft_total1= $("#proft_total1").val().replace(new RegExp("\,","g"), "");
	var finance_proft_total2= $("#proft_total2").val().replace(new RegExp("\,","g"), "");
	
	var finance_fax1= $("#fax1").val().replace(new RegExp("\,","g"), "");
	var finance_fax2= $("#fax2").val().replace(new RegExp("\,","g"), "");
	
	$("#finance_income").text(finance_income2);
	$("#finance_income_pre").text(formatVal2(finance_income2-finance_income1));
	$("#finance_income_growth").text(formatVal((finance_income2-finance_income1)*100/Math.abs(finance_income1)));
	
	$("#finance_proft_total").text(finance_proft_total2);
	$("#finance_proft_total_pre").text(formatVal2(finance_proft_total2-finance_proft_total1));
	$("#finance_proft_total_growth").text(formatVal((finance_proft_total2-finance_proft_total1)*100/Math.abs(finance_proft_total1)));
	
	$("#finance_fax").text(finance_fax2);
	$("#finance_fax_pre").text(formatVal2(finance_fax2-finance_fax1));
	$("#finance_fax_growth").text(formatVal((finance_fax2-finance_fax1)*100/Math.abs(finance_fax1)));
	
});








function countFundSpanAuto(idStart, countStr, totalStr) {

	var indexs = countStr.split(",");
	var count = 0;
	for ( var i = 0; i < indexs.length; i++) {
		var fund = $("#" + idStart + indexs[i]).text().replace(new RegExp("\,","g"), "");
		if (!$.isNumeric(fund))
			fund = "0";
		count = ((parseFloat(count)*10000 + parseFloat(fund)*10000)/10000).toFixed(4);
	}

	count = formatNumberAuto(count.toString(), 9, 4, 2);// 格式化金额
	$("#" + idStart + totalStr).text(count);
}




</script>


